package com.ohuang.wallpapermanager.config

import android.annotation.SuppressLint
import com.ohuang.wallpapermanager.storage.storage.SpStorageUtil
import com.ohuang.wallpapermanager.storage.storage.getValue
import com.ohuang.wallpapermanager.storage.storage.setValue
import com.ohuang.wallpapermanager.util.AppUtil
@SuppressLint("StaticFieldLeak")
object LocalConfig {

    private var storageUtil = SpStorageUtil(AppUtil.getInstance().application, "localConfig")
    var isWorkManagerEnable:Boolean by  storageUtil.get("isWorkManagerEnable", true) // 是否启动workManager

    var workManagerLastRunTime:Long by storageUtil.get("workManagerLastRunTime", 0L) // workManager上次运行时间


    var isUseWallPaperService:Boolean by storageUtil.get("isUseWallPaperService", true) // 是否使用服务
    var useWallPaperImagePath:String by storageUtil.get("useWallPaperImagePath", "") // 使用壁纸图片路径
    var useWallPaperImagePathLock:String by storageUtil.get("useWallPaperImagePathLock", "") // 使用锁屏壁纸图片路径
    var wallPaperServiceShowMode:Int by storageUtil.get("showMode", 0)  //0 各自显示 1显示锁屏 2显示桌面壁纸
}